// pages/wallet/wallet.ts

Page({

  data: {
    statusBarHeight: 0,
    balance: '12,345.67',
    transactions: [
      { id: '1', type: 'income', title: '订单收入', time: '2023-11-15 14:30', amount: '+¥128.50' },
      { id: '2', type: 'expense', title: '提现', time: '2023-11-14 09:15', amount: '-¥2,000.00' },
      { id: '3', type: 'income', title: '订单收入', time: '2023-11-13 20:45', amount: '+¥86.30' }
    ]
  },

  onLoad() {
    const systemInfo = wx.getSystemInfoSync();
    this.setData({
      statusBarHeight: systemInfo.statusBarHeight || 0
    });
  },

  goBack() {
    wx.navigateBack();
  },

  navigateTo(e: any) {
    const url = e.currentTarget.dataset.url;
    if (url) {
      wx.navigateTo({ url });
    }
  },

  showWithdrawModal() {
    wx.showToast({
      title: '提现功能开发中',
      icon: 'none'
    });
  },

  openSettings() {
    wx.showToast({
      title: '提现设置开发中',
      icon: 'none'
    });
  },

  openHelp() {
    wx.showToast({
      title: '帮助中心开发中',
      icon: 'none'
    });
  }
});

